import request from '@/utils/request'

export function fetchList(query) {
  return request({
    url: '/events',
    method: 'get',
    params: query
  })
}
export function fetchclubsmentList() {
  return request({
    url: '/clubs/list',
    method: 'get',
  })
}
export function getUserList() {
  return request({
    url: '/users/list',
    method: 'get',
  })
}

//getMemberList
export function getMemberList(row) {
  return request({
    url: '/signups/event',
    method: 'get',
    params:{
      id:row.id
    }
  })
}
export function createArticle(data) {
  return request({
    url: '/events',
    method: 'post',
    data
  })
}
export function updateStatus(id,status) {
  return request({
    url: '/events/status',
    method: 'post',
    params:{
      id:id,
      status:status
    }
  })
}
export function updateArticle(data) {
  return request({
    url: '/events',
    method: 'put',
    data
  })
  
}

export function deleteArticle(data) {
  return request({
    url: '/events',
    method: 'delete',
    data
  })
}
export function sendMail(data) {
  return request({
    url: '/send-mail/event',
    method: 'post',
    data
  })
}